﻿/****************************************************************************************************
 **        Name: Exception
 ** Description: Log of exceptions.
 ****************************************************************************************************
 ** Revisions
 **  Date        Author               Work Item  Description
 **  ----------  -------------------  ---------  ----------------------------------------------------
 **  11/30/2008  Chad Green             11774    Initial Development
 ****************************************************************************************************/

CREATE TABLE dbo.Exception
(
	ID                char(49)      NOT NULL,
	System            nVarChar(20)  NOT NULL,
	Message           nVarChar(250) NOT NULL,
	Source            nVarChar(250) NOT NULL,
	StackTrace        nVarChar(MAX) NOT NULL,
	TargetSite        nVarChar(250) NOT NULL,
	ExceptionDateTime dateTime      NOT NULL,
	SeverityID        smallInt      NOT NULL,
	NotificationSent  bit           NOT NULL,
	ClassName         nVarChar(500) NOT NULL,
	MethodName        nVarCHar(500) NOT NULL
)
GO

EXEC sp_addextendedproperty N'MS_Description', N'Log of exceptions.', 'SCHEMA', N'dbo', 'TABLE', N'Exception', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'Identifier of the exception record.', 'SCHEMA', N'dbo', 'TABLE', N'Exception', 'COLUMN', N'ID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The name of the system recording the exception.', 'SCHEMA', N'dbo', 'TABLE', N'Exception', 'COLUMN', N'System'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The name of the application or object that causes the exception.', 'SCHEMA', N'dbo', 'TABLE', N'Exception', 'COLUMN', N'Source'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Representation of the frames on the call stack at the time the exception was thrown.', 'SCHEMA', N'dbo', 'TABLE', N'Exception', 'COLUMN', N'StackTrace'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The method that throws the exception.', 'SCHEMA', N'dbo', 'TABLE', N'Exception', 'COLUMN', N'TargetSite'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The date and time the exception was raised.', 'SCHEMA', N'dbo', 'TABLE', N'Exception', 'COLUMN', N'ExceptionDateTime'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign Key - Identifier of the severity of the exception.', 'SCHEMA', N'dbo', 'TABLE', N'Exception', 'COLUMN', N'SeverityID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Flag indicating whether a notification has been sent to the application administrator.', 'SCHEMA', N'dbo', 'TABLE', N'Exception', 'COLUMN', N'NotificationSent'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The name of the class where the exception was raised.', 'SCHEMA', N'dbo', 'TABLE', N'Exception', 'COLUMN', N'ClassName'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The name of the method where the exception was raised.', 'SCHEMA', N'dbo', 'TABLE', N'Exception', 'COLUMN', N'MethodName'
GO